centroid

open override fun centroid(): Vec2(source)

Computes the centroid (geometric center) of the polygon.

For a non-self-intersecting polygon, this is the center of mass assuming uniform density.

Return

The centroid as a vector.